Dedicated Server Setup
A Dedicated Server is an optimized version of Reign of Kings that has been designed to be run for longer periods of time, with none of the graphical overhead. Users can host one themselves as shown or rent one from a Reign of Kings Game Server Providers that will host the server for you. Server Requirements Windows 7, 8, 8.1, Server 2008, Server 2012 & 64-Bit Dual Core processor (not as CPU intensive) 4GB memory (currently uses around 2GB memory) 2GB disk space (install folder) 100MB disk space (save location folder in %APPDATA%) Step 1: Fetching Game Server files from SteamCMD It is possible to fetch the steam files programmatically from Steam using SteamCMD. # Create a folder where you wish to store your RoK game server hosting files # Inside of the folder, place the newly downloading SteamCMD.exe file # Create a batch file named SteamCMD.bat # Place the following code in this batch file: ::: @echo off ::: start "" steamcmd.exe +login USER PASS +force_install_dir "C:\Some\Path\Where\You\Want\Game\Server\Files\To\Go" +app_update 344760 validate +quit # Right-click SteamCMD.bat and Run as Administrator # Your game server files should be completely downloaded by now Step 1 (alternate method): Locating Game Server Files on Hard Drive You can host RoK directly from your Steam common folder. To locate your common folder: # Right-click Reign of Kings from Steam, select Properties # Click Local Files tab # Click Browse Local Files'' button Step 2: Setting up a Reign of Kings Dedicated Server # Create a batch file named '''RoK.bat in your newly created SteamCMD folder (Step 1) or your Steam common folder (Step 1: (alternate method)). # Place the following code in this batch file: ::: start "" ROK.exe -batchmode -nographics Alternatively you can enable silent crashes and use the following code: ::: start "" ROK.exe -batchmode -nographics -silent-crashes # Right-click RoK.bat and Run as Administrator # ROK.exe will now be loaded in # Open up Task Manager'' by right clicking on your Windows task bar and clicking Task Manager # Find the process ROK.exe and terminate it # You will now have a '''Configuration folder in your RoK root files. Inside of this folder you will find the following .cfg files: ## DeathMessages.cfg ## Permissions.cfg ## ServerSettings.cfg ## Users.cfg Step 3: Port Forwarding Add an incoming rule to your Windows Firewall to allow UDP port 7350 (or whichever port you are using). You may additionally need to add a forwarding rule to your network router. You can use PortForward.com to read how to do this. Tips & Tricks * If you have scheduled automatic restarts or force quit your ROK.exe process, the last 5 minutes of data will not be saved. You can notify your players to logout manually while in the gameserver or use the /shutdown admin command to prevent data loss. * You can add colors to your server hostname by using the FFFFFF color hex format placed directly in front of the text you wish to color. Color-Hex.com to find a color. * Let your players know that you should only use common characters (spaces, numbers, and characters) to prevent data loss. This is only a theory, has not been tested! Configuring your RoK Game Server! Now comes the fun part, setting up your RoK game server to your liking. Location of World Saves # Navigate to your Application Data folder. To do this, you can type %APPDATA% in your Start -> Search Programs and Files input box and press Enter. # Navigate up one directory. # Navigate to the LocalLow\CodeHatch\Reign of Kings\ directory. # You will see a HeatMaps folder and a bunch of folders prefixed with Slot # Navigate to the SlotXXX where XXX is the value of the worldSave variable from your ServerSettings.cfg file # You can delete Players from the Players folder. To complete wipe your server, remove all of the files in this folder and restart your game server. Tools :ROK Server Launcher - automatically restart your server with a nice, easy to use tool